﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly=" Inovout.Kuajing"
				        namespace="Inovout.Kuajing.Models">

  <class name="ShipmentOrder" table="ShipmentOrder">
    <id name="Id" access="field.camelcase"
        column="ShipmentOrderId" type="Int32">
      <generator class="native" />
    </id>
    <many-to-one name="Shipper" column="ShipperId" foreign-key="FK_ShipmentOrder_Shipper"
                 class="Inovout.Kuajing.Models.Shipper" />
    <property name="No"/>
    <property name="Amount" />
    <property name="Status" />

    <property name="ReceiverZipcode"/>
    <property name="ReceiverProvince" />
    <property name="ReceiverCity"/>
    <property name="ReceiverCounty" />
    <property name="ReceiverAddress"/>
    <property name="ReceiverName" />
    <property name="ReceiverIdNo" />
    <property name="ReceiverMobile"/>
    <property name="ReceiverPhone" />

    <property name="LogisticsCompanyCode" />
    <property name="LogisticsCompanyName" />
    <property name="LogisticsOrderNo" />
    <property name="ExpectedWeight" />
    
    <property name="PaymentIdNo" />
    <property name="PaymentOrderNo" />
    <property name="PaymentCompanyCode" />

    <set name="Items" cascade="all">
      <key column="ShipmentOrderId" />
      <one-to-many class="Inovout.Kuajing.Models.ShipmentOrderItem" />
    </set>
    <property name="ExternalShipperId" />
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


